#define MYNAME "gpssim"
-static FILE *fout;
+static gbfile *fout;
static char *wayptspd;
static char *splitfiles_opt;
static int splitfiles;
}
if (!splitfiles) {
- fout = xfopen(fname, "wb", MYNAME);
+ fout = gbfopen(fname, "wb", MYNAME);
}
}
gpssim_wr_deinit(void)
{
if (fout) {
- fclose(fout);
+ gbfclose(fout);
fout = NULL;
}
static void
gpssim_write_sentence(const char *const s)
{
- fprintf(fout, "$%s*%02X\r\n", s, nmea_cksum(s));
+ gbfprintf(fout, "$%s*%02X\r\n", s, nmea_cksum(s));
}
static void
doing_tracks ? "-track" : "-route",
trk_count++);
ofname = xstrappend(ofname, c);
- fout = xfopen(ofname, "wb", MYNAME);
+ fout = gbfopen(ofname, "wb", MYNAME);
xfree(ofname);
}
track_recompute(rh, NULL);
gpssim_trk_ftr(const route_head *rh)
{
if (splitfiles) {
- fclose(fout);
+ gbfclose(fout);
fout = NULL;
}
}
if (splitfiles) {
char *ofname = xstrdup(fnamestr);
ofname = xstrappend(ofname, "-waypoints.gpssim");
- fout = xfopen(ofname, "wb", MYNAME);
+ fout = gbfopen(ofname, "wb", MYNAME);
xfree(ofname);
}
if (wayptspd && wayptspd[0]) {
}
waypt_disp_all(gpssim_write_pt);
if (splitfiles) {
- fclose(fout);
+ gbfclose(fout);
fout = NULL;
}
}